package com.wanxi.controller.other;

import com.alibaba.fastjson2.JSONObject;
import com.wanxi.dto.ResultDTO;
import com.wanxi.service.LoginService;
import com.wanxi.service.ManagerService;
import com.wanxi.vo.ManagerVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
/**
 * @author Chengbo Zhang
 */
@RestController
@CrossOrigin(origins = "http://localhost:8081")
public class LoginController {
    @Autowired
    LoginService loginService;

    @PostMapping("/manager/login")
    public ResultDTO login(ManagerVO managerVO){
        return loginService.login(managerVO);
    }
}
